









package com.company.z4guangchazhe.zhongjie.section3;

/**
 * @author cbf4Life cbf4life@126.com
 * I'm glad to share my knowledge with you all.
 */
public class ProductManager {
	
	
	private boolean isPermittedCreate = false;
	
	
	public Product createProduct(String name){
		
		isPermittedCreate = true;
		Product p = new Product(this,name);
		return p;
	}
	
	
	public void abandonProduct(Product p){
		
		p = null;
	}
	
	
	public void editProduct(Product p,String name){
		
		p.setName(name);
	}
	
	
	public boolean isCreateProduct(){
		return isPermittedCreate;
	}
	
	
	public Product clone(Product p){
		
		return p.clone();
	}
}